package com.example.myapplication.mi;

import androidx.annotation.NonNull;

import com.example.myapplication.R;
import com.example.myapplication.mienum.MiObjectType;

public class MiObject {
    private String deviceName;
    private MiObjectType miObjectType;
    private String tip;

    public MiObject(){}
    public MiObject( String deviceName,MiObjectType miObjectType) {
        this.miObjectType = miObjectType;
        this.deviceName = deviceName;
        this.tip="-----------------";
    }

    public MiObject(String deviceName, MiObjectType miObjectType, String tip) {
        this.deviceName = deviceName;
        this.miObjectType = miObjectType;
        this.tip = tip;
    }


    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public MiObjectType getMiObjectType() {
        return miObjectType;
    }

    public void setMiObjectType(MiObjectType miObjectType) {
        this.miObjectType = miObjectType;
    }

    public String getTip() {
        return tip;
    }

    public void setTip(String tip) {
        this.tip = tip;
    }
    public int getObjectIconID(){
        switch (this.miObjectType){
            case DOOR_SENSOR:
                return R.mipmap.door_sensor;
            case AIR_CONDITION:
                return R.mipmap.air_condition;
            case LIGHT:
                return R.mipmap.light;
            case FAN:
                return R.mipmap.fan;
        }
        return R.mipmap.qq_small;
    }
}
